﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations.Schema;

namespace LetLord.Models
{
    [Table("Landlord")]
    public class Landlord : UserProfile
    {
        public Landlord()
        {
            this.ResidentialProperties = new List<ResidentialProperty>();
            this.Viewings = new List<Viewing>();
            this.LandlordPreferences = new List<LandlordPreferences>();
        }
        public static int LandlordProfileViews { get; set; }

        // A Landlord can have many ResidentialProperties
        public virtual ICollection<ResidentialProperty> ResidentialProperties { get; set; }

        // A Landlord can create many Viewings
        //[ForeignKey("ViewingId")]
        public virtual ICollection<Viewing> Viewings { get; set; }

        // A Landlord has many Preferences
        public virtual ICollection<LandlordPreferences> LandlordPreferences { get; set; }
    }
}